/*
 * @Descripttion: 
 * @version: 
 * @Author: yuanliutech
 * @Date: 2022-11-30 09:18:03
 * @LastEditors: yuanliutech@lwj
 * @LastEditTime: 2022-12-29 17:01:02
 */
import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';

import plugins from './plugins'
Vue.use(plugins)

Vue.config.productionTip = false;
import '@assets/style/reset.css';
import '@assets/style/iconfont.css';

import axios from 'axios';
// 测试环境
axios.defaults.baseURL = 'https://sc.yuanliuiot.com/sc/platform/';
Vue.prototype.$baseURL_copy = 'https://sc.yuanliuiot.com/sc/platform/'



import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

// 省市区
// import VDistpicker from 'v-distpicker';
// Vue.component('v-distpicker', VDistpicker);

// xlsx相关
// import XLSX from 'xlsx';
// require('script-loader!file-saver'); //保存文件用
// require('script-loader!xlsx/dist/xlsx.core.min'); //xlsx核心
// Vue.use(XLSX);

// 在Vue中使用this.$jsonp，先安装相应的依赖 按需引入import { jsonp } from 'vue-jsonp'
// import {
//     VueJsonp
// } from 'vue-jsonp';
// Vue.use(VueJsonp);

//全局过滤器
import * as filters from './filters/filterModule.js';
Object.keys(filters).forEach(key => {
    Vue.filter(key, filters[key]);
});


import dataV from '@jiaminghi/data-view'
Vue.use(dataV)

import {
    initDynamicRoutes
} from './router/index' //动态路由引入
initDynamicRoutes()
import './utils/permission' //按钮权限控制全局引入
import './utils/selectLoadMore.js' //下拉框加载更多

import './assets/icons/index' //svg

import preventRepeatClick from './utils/preventRepeatClick' // 防止重复点击
Vue.use(preventRepeatClick)

import { Toast } from 'vant'; // 有版本问题 建议安装指定版本2.12.54 
import 'vant/lib/index.css';
Vue.use(Toast);

// 字典标签组件
import DictTag from '@/components/DictTag'
// 字典数据组件
import DictData from '@/components/DictData'
// 全局组件挂载
Vue.component('DictTag', DictTag)
DictData.install()

new Vue({
    router,
    store,
    render: h => h(App),
}).$mount('#app');